﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="copy_channel.aspx.cs" Inherits="He.Web.manage.tools.copy_channel" %>

<%@ Register Src="../_uc/head_list.ascx" TagPrefix="uc" TagName="head_list" %>
<%@ Register Src="../_uc/head.ascx" TagPrefix="uc" TagName="head" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>栏目下数据对拷</title>
    <uc:head runat="server" ID="uchead" />
    <uc:head_list runat="server" ID="uchead_list" />
</head>
<body>
    <form id="form1" runat="server">
    <input type="hidden" name="act" value="copy_channel" />
    <div class="navigation">
        <b>您当前的位置：首页 &gt; 扩展工具 &gt; 栏目下数据对拷</b>
    </div>
    <div class="spClear">
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
        <tr>
            <th colspan="5" align="left">
                栏目下数据对拷
            </th>
        </tr>
        <tr>
            <td colspan="5" height="50">
                <div class="ftip">如果分类下文章比较多，建议每次只拷贝一个分类，拷贝前建议先进行数据库备份。立即进入<a href="backup.aspx">备份数据库</a></div>
            </td>
        </tr>
        <tr>
            <td width="35%" align="right">
                选择栏目：
            </td>
            <td width="10%" align="left">
                <asp:DropDownList ID="ddlFromChannelId" runat="server" CssClass="select" AutoPostBack="true"
                    OnSelectedIndexChanged="ddlFromChannelId_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
            <td width="10%" align="right">
                拷贝至：
            </td>
            <td align="left" width="10%">
                <asp:DropDownList ID="ddlToChannelId" runat="server" CssClass="select">
                </asp:DropDownList>
            </td>
            <td>
                <asp:Button ID="btnSend" CssClass="submit" Text="开始对拷" PostBackUrl="copy.aspx" runat="server" />
            </td>
        </tr>
        <tr>
            <td align="left" colspan="5">
                <input type="checkbox" id="copy_all" name="copy_child" checked="checked" value="1" />连带分类下数据（将栏目分类和分类下的数据一起拷贝，若不选则只拷贝分类）<br />
                <input type="checkbox" id="is_translate" name="is_translate" value="1" checked="checked"/>自动翻译（当您所拷贝的内容需要翻译成英文时，请选择该项，翻译后内容会转换为无HTML标签的纯文本）<br />
                <input type="checkbox" id="clear_tags" name="clear_tags" value="1" />将“内容详情”转化为无格式文本(一般用于目标对象是手机站时)<br />
                <input type="checkbox" id="make_thumb" name="make_thumb" value="1" checked="checked" />复制图片
                图片宽度：<input type="text" class="txtInput2 small2" name="img_width" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)));"
                    value="0" />PX (若需拷贝至英文版请输入0，表示按原始比例复制，若需拷贝至手机版，建议输入600)
            </td>
        </tr>
    </table>
    <div class="spClear">
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
        <asp:Repeater ID="rptList" runat="server" OnItemDataBound="rptList_ItemDataBound">
            <HeaderTemplate>
                <tr>
                    <th width="5%">
                        选择
                    </th>
                    <th width="5%">
                        编号
                    </th>
                    <th>
                        标题
                    </th>
                    <th width="15%">
                        所属栏目
                    </th>
                </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <span class="checkall">
                            <%#Convert.ToInt32(Eval("layer")) == 1 ? "<input type=\"checkbox\" name=\"idlist\" value=\""+Eval("id")+"\" />" : "" %>
                        </span>
                    </td>
                    <td>
                        <asp:Label ID="lb_id" runat="server" Text='<%#Eval("id")%>'></asp:Label>
                    </td>
                    <td>
                        <asp:Literal ID="LitFirst" runat="server"></asp:Literal>
                        <asp:HiddenField ID="txtcategory_id" runat="server" Value='<%#Eval("id") %>' />
                        <asp:HiddenField ID="txtlayer" runat="server" Value='<%#Eval("layer") %>' />
                        <%#Eval("title") %>
                    </td>
                    <td>
                        <%#GetChannelTitle(Eval("channel_id"))%>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
    <div class="spClear">
    </div>
    <div style="line-height: 30px; height: 30px;">
        <div id="Pagination" class="right flickr">
        </div>
        <div class="left">
            <%if (new He.BLL.category().GetRecordCount("channel_id=" + channel_id) > 0)
              { %>
            <span class="btn_all" onclick="CheckAll(this)">全 选</span>
            <%} %>
        </div>
    </div>
    </form>
</body>
</html>
